package cn.lenchu.data.h2.converter;

import cn.lenchu.data.h2.entity.GroupStockEntity;
import cn.lenchu.data.model.GroupStock;
import org.springframework.beans.BeanUtils;

/**
 * @author lenchu
 */
public class GroupStockConverter {

    public static GroupStock toGroupStock(GroupStockEntity entity) {
        GroupStock groupStock = new GroupStock();
        BeanUtils.copyProperties(entity, groupStock, "createTime", "updateTime");
        return groupStock;
    }

    public static GroupStockEntity toGroupStockEntity(GroupStock groupStock) {
        GroupStockEntity entity = new GroupStockEntity();
        BeanUtils.copyProperties(groupStock, entity, "createTime", "updateTime");
        return entity;
    }
}
